package com.pactera.madp.cp.common.constant;

/**
 * 批量同步数据常量
 */
public interface Constants {

    String DATE_FORMAT = "yyyyMMdd";

    String SEPARATOR_VERTICAL_LINE = "\\|";

    String SEPARATOR_STX = "\u0002";

    String EXECUTOR_PROCESS_NAME = "syncExecutor";

    String EXECUTOR_PROCESS_THREAD_NAME_PREFIX = "sync-";

    // CRM同步文件名
    String FN_CUSTOM = "custom_yyyyMMdd.txt";
    String FN_CUSTOM_OK = "custom_yyyyMMdd.ok";
    String FN_CUST_ASSETS = "cust_assets_yyyyMMdd.txt";
    String FN_CUST_ASSETS_OK = "cust_assets_yyyyMMdd.ok";
    String FN_CUST_TAG = "cust_tag_yyyyMMdd.txt";
    String FN_CUST_TAG_OK = "cust_tag_yyyyMMdd.ok";
    String FN_FINA_EXPIRE = "fina_expire_yyyyMMdd.txt";
    String FN_FINA_EXPIRE_OK = "fina_expire_yyyyMMdd.ok";
    String FN_DKFINA_EXPIRE = "dkfina_expire_yyyyMMdd.txt";
    String FN_DKFINA_EXPIRE_OK = "dkfina_expire_yyyyMMdd.ok";
    String FN_IMPORTANT_DAYS = "important_days_yyyyMMdd.txt";
    String FN_IMPORTANT_DAYS_OK = "important_days_yyyyMMdd.ok";
    String FN_PRE_SAVEDEPT = "pecust_pre_savedept_yyyyMMdd.txt";
    String FN_PRE_SAVEDEPT_OK = "pecust_pre_savedept_yyyyMMdd.ok";

    // 人力资源同步文件名
    String FN_HROK = "HROK";
    String FN_ORG = "B001.dat";
    String FN_PSN = "A001.dat";
    String FN_MOBILE = "A282.dat";
    String FN_JOB = "C001.dat";
    String FN_QUALIF = "A253.dat";
    String FN_POST = "A251.dat";
    String FN_BUILD = "B004.dat";
    String FN_CODE_SET = "Sys_Code_Set.dat";
    String FN_CODE_ITEM = "SYS_CODE_ITEM.dat";

    // 基金产理财产品同步文件名
    String FN_FUND = "PrdInfoyyyyMMdd_7";
    String FN_FUND_OK = "PrdInfoyyyyMMdd_7.ok";
    String FN_FUND_STD_DATA = "FundStdDatayyyyMMdd_7";
    String FN_FUND_STD_DATA_OK = "FundStdDatayyyyMMdd_7.ok";
    String FN_PRD = "PrdInfoyyyyMMdd_7";
    String FN_PRD_OK = "PrdInfoyyyyMMdd_7.ok";
    String FN_STD_DATA = "StdDatayyyyMMdd_7";
    String FN_STD_DATA_OK = "StdDatayyyyMMdd_7.ok";
    String FN_CYCLE_SET = "CycleSetyyyyMMdd_7";
    String FN_CYCLE_SET_OK = "CycleSetyyyyMMdd_7.ok";
    String FN_ANNUALIZED_RATE = "AnnualizedRateyyyyMMdd_7";
    String FN_ANNUALIZED_RATE_OK = "AnnualizedRateyyyyMMdd_7.ok";

    // 单位：秒
    Integer EXPIRE_TIME = 3600;

    String SYNC_FIRST_EMP = "sync:fst_syn_emp";

    String SYNC_LOCK_PREFIX = "sync:lock_";

    String SYNC_STATE_PREFIX = "sync:ts_";

    // 同步业务流水号
    String SYNC_HR_SERIAL_NUM = "sync:hr_serial_num";
    String SYNC_FINA_SERIAL_NUM = "sync:fina_serial_num";

    String SYNC_ORG_THRESHOLD = "sync:org_td";
    String SYNC_PSN_THRESHOLD = "sync:psn_td";
    String SYNC_FINA_THRESHOLD = "sync:fina_td";

    String SYNC_ORG_BUSINESS_ORG2WX_LOCK = "sync:ob_o2w_lock";
    String SYNC_ORG_BUSINESS_WX2SYS_LOCK = "sync:ob_w2s_lock";

    String SYNC_PSN_BUSINESS_EMP2WX_LOCK = "sync:eb_o2w_lock";
    String SYNC_PSN_BUSINESS_WX2SYS_LOCK = "sync:eb_w2s_lock";
    String SYNC_PSN_BY_ORG = "sync:pbo_";

    String SYNC_FINA_BUSINESS_LOCK = "sync:fb_lock";
    String SYNC_SALE_BUSINESS_LOCK = "sync:sb_lock";

    String SYNC_CUSTOM_BUSINESS_LOCK = "sync:cb_lock";
    String SYNC_ASSETS_BUSINESS_LOCK = "sync:ab_lock";
    String SYNC_TAG_BUSINESS_LOCK = "sync:tb_lock";
    String SYNC_FINA_EXPIRE_BUSINESS_LOCK = "sync:feb_lock";
    String SYNC_DKFINA_EXPIRE_BUSINESS_LOCK = "sync:deb_lock";
    String SYNC_IMPORTANT_DAYS_BUSINESS_LOCK = "sync:idb_lock";
    String SYNC_PRE_SAVEDEPT_BUSINESS_LOCK = "sync:psb_lock";

    String SYNC_BUSI_STATE = "sync:busi_";

    // 企业微信与机构关联列表缓存key
    String SYNC_ORG_WX_RELATION = "sync:owr";
    // 有序机构(根到子)列表缓存key
    String SYNC_ORG_ORDER_LIST = "sync:ool";
    // 根机构和叶子机构缓存key
    String SYNC_ORG_LEAF_ROOT = "sync:olr";
    // 回调成功标识
    String SYNC_CB_FLAG = "sync:cb_flag";
    // 人员职位信息
    String SYNC_PSN_JOB_INFO = "sync:pji";
    // 资质缓存key
    String SYNC_QUALIF_INFO = "sync:qi";

    // 企微批量同步机构title模板
    String SYNC_ORG_CSV_TEMPLATE = "部门名称,部门ID,父部门ID,排序";
    // 企微批量同步人员title模板
    String SYNC_PSN_CSV_TEMPLATE = "姓名,帐号,手机号,邮箱,企业邮箱,所在部门,职位,性别,是否部门内领导,排序,别名,地址,座机,禁用,禁用项说明：(0-启用;1-禁用)";

    /**
     *  人力资源删除标识
     *  00900-正常
     *  其它-删除
     */
    String SYNC_DEL_FLAG = "00900";

    /**
     *  性别
     *  01001-男
     *  01002-女
     */
    String SYNC_SEX_FLAG = "01001";

    // crm客户同步表表名前缀名
    String TP_SYNC_CUSTOM_INFO = "cp_sync_custom_info_";
    // crm客户同步历史表表名前缀名
    String TP_SYNC_CUSTOM_INFO_HIS = "cp_sync_custom_info_his_";
    // crm客户同步表分表数目
    Integer TC_CUSTOM_INFO = 10;

    // crm客户资产同步表表名前缀名
    String TP_SYNC_ASSETS_INFO = "cp_sync_assets_info_";
    // crm客户资产同步历史表表名前缀名
    String TP_SYNC_ASSETS_INFO_HIS = "cp_sync_assets_info_his_";
    // crm客户资产同步表分表数目
    Integer TC_ASSETS_INFO = 10;

    // crm客户标签同步表表名前缀名
    String TP_SYNC_TAG_INFO = "cp_sync_cust_tag_info_";
    // crm客户标签同步历史表表名前缀名
    String TP_SYNC_TAG_INFO_HIS = "cp_sync_cust_tag_info_his_";
    // crm客户标签同步表分表数目
    Integer TC_TAG_INFO = 10;

    // crm客户业务表表名前缀名
    String TP_WORK_CUSTOM_INFO = "cp_work_custom_info_";
    // crm客户资产业务表表名前缀名
    String TP_WORK_ASSETS_INFO = "cp_work_assets_info_";
    // crm客户标签业务表表名前缀名
    String TP_WORK_TAG_INFO = "cp_work_cust_tag_info_";

}
